package com.example.redis.config.redisson;

import lombok.Data;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.HashMap;
import java.util.Map;

/**
 * redisson连接池配置
 *
 * @Author guoyb
 * @Date 2020/5/9  16:12
 */
@Data
@ConfigurationProperties(prefix = "spring.redis")
public class RedissonProperties {

    private String host;

    private String port;

    private String password;

    private int database = 0;

    private int timeout = 30000;

    private int connectionPoolSize = 50;

    private int connectionMinimumIdleSize = 10;

    private int slaveConnectionPoolSize = 50;

    private int masterConnectionPoolSize = 50;


    private String[] sentinelAddresses;

    private String masterName;

    private Map<String, String> cluster = new HashMap<>();
}
